export const MachineAppointmentQueries = {
    GetMachineAppointments: `
    SELECT
      id,
      machineId,
      machineName,
      machineStartDate,
      machineEndDate,
      requestorId,
      requestorName,
      requestorPhone,
      requestorEmail,
      status,
      approverId,
      approverName,
      approverPhone,
      approverEmail,
      approveTime,
      createdTime
    FROM my_schema.machine_appointment
    `,

    GetAppliedMachineAppointmentsById: `
    SELECT
      id,
      machineId,
      machineName,
      machineStartDate,
      machineEndDate,
      requestorId,
      requestorName,
      requestorPhone,
      requestorEmail,
      status,
      approverId,
      approverName,
      approverPhone,
      approverEmail,
      approveTime
    FROM my_schema.machine_appointment
    WHERE
      machineId = ?
    AND
      status in ('待审批', '已批准')
    `,
  
    GetMachineAppointmentById: `
    SELECT
      id,
      machineId,
      machineName,
      machineStartDate,
      machineEndDate,
      requestorId,
      requestorName,
      requestorPhone,
      requestorEmail,
      status,
      approverId,
      approverName,
      approverPhone,
      approverEmail,
      approveTime
    FROM my_schema.machine_appointment
    WHERE
      id = ?
    `,
  
    AddMachineAppointment: `
    INSERT INTO my_schema.machine_appointment (
      machineId,
      machineName,
      machineStartDate,
      machineEndDate,
      requestorId,
      requestorName,
      requestorPhone,
      requestorEmail,
      status,
      approverId,
      approverName,
      approverPhone,
      approverEmail,
      approveTime,
      createdTime,
      updatedTime
    )
      VALUES ?
    `,

    UpdateMachineAppointmentById: `
    UPDATE my_schema.machine_appointment
    SET ?
    WHERE
      id = ?
    `,
  
    DeleteMachineAppointmentById: `
    DELETE FROM my_schema.machine_appointment
    WHERE
      id = ?
    `
  };